﻿using Apps.IDAL.PL;
using Apps.Models;
using Apps.Models.PL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.DAL.PL
{
    public partial class PL_RC_DETAILSRepository: BaseRepository<PL_RC_DETAILS>, IPL_RC_DETAILSRepository, IDisposable
    {
        public IQueryable<PL_RC_DETAILS> QueryUnStockInList()
        {
            IQueryable<PL_RC_DETAILS> list = from a in Context.PL_RC_DETAILS
                                                  join b in Context.CY_INSTOCK_DETAIL on a.DETAIL_ID equals b.DETAIL_ID into stock
                                                      from tb in stock.DefaultIfEmpty()
                                                  where tb.DETAI_ID== null
                                                  select a;
            return list;
        }
    }
}
